package com.hfh.main.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 用户表
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("col_user")
@Schema(name = "UserEntity", description = "$!{table.comment}")
public class UserEntity extends Model<UserEntity> {

    @Schema(description = "编号")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "账号&工号")
    @TableField("user_acc")
    private String acc;

    @Schema(description = "密码")
    @TableField("user_pwd")
    private String pwd;

    @Schema(description = "名称")
    @TableField("user_name")
    private String name;

    @Schema(description = "最终得分")
    @TableField("db_final")
    private double dbFinal;

    @Schema(description = "身份")
    @TableField("user_identity")
    private String identity;

    @Schema(description = "身份证号")
    @TableField("user_idcard")
    private String idcard;

    @Schema(description = "性别")
    @TableField("user_sex")
    private String sex;

    @Schema(description = "生日")
    @TableField("user_birth")
    private String birth;

    @Schema(description = "家庭住址")
    @TableField("user_address")
    private String address;

    @Schema(description = "联系电话")
    @TableField("user_phone")
    private String phone;

    @Schema(description = "QQ")
    @TableField("user_qq")
    private String qq;

    @Schema(description = "微信")
    @TableField("user_wechat")
    private String wechat;

    @Schema(description = "角色")
    @TableField("user_role")
    private Integer role;

    @Schema(description = "学院")
    @TableField("user_academic_id")
    private Integer academicId;

    @Schema(description = "宿舍栋")
    @TableField("user_dormitory")
    private Integer dormitory;

    @Schema(description = "宿舍房间")
    @TableField("user_dormitory_room")
    private Integer dormitoryRoom;

    @Schema(description = "宿舍床号")
    @TableField("user_dormitory_room_num")
    private Integer dormitoryRoomNum;

    @Schema(description = "办公室栋")
    @TableField("user_office")
    private Integer office;

    @Schema(description = "办公室")
    @TableField("user_office_room")
    private Integer officeRoom;

    @Schema(description = "办公室号")
    @TableField("user_office_room_num")
    private Integer officeRoomNum;

    @Schema(description = "是否毕业")
    @TableField("user_graduate")
    private Integer graduate;

    @Schema(description = "入学年份")
    @TableField("user_start_study")
    private String startStudy;

    @Schema(description = "毕业年份")
    @TableField("user_end_study")
    private String endStudy;

    @Schema(description = "专科-1本科-2研究生-3")
    @TableField("user_diploma")
    private Integer diploma;

    @Schema(description = "创建者")
    @TableField("create_by")
    private String createBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @Schema(description = "更新者")
    @TableField("update_by")
    private String updateBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @Schema(description = "伪删除")
    @TableField("undock")
    private Integer undock;

    @Schema(description = "状态")
    @TableField("state")
    private Integer state;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
